home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / python2.4 / encodings / cp1140.pyc (.txt) < prev    next >
Python Compiled Bytecode  |  2005-10-18  |  1KB  |  38 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.4)
  3.  
  4. ''' Python Character Mapping Codec for cp1140
  5.  
  6. Written by Brian Quinlan(brian@sweetapp.com). NO WARRANTY.
  7. '''
  8. import codecs
  9. import copy
  10. import cp037
  11.  
  12. class Codec(codecs.Codec):
  13.     
  14.     def encode(self, input, errors = 'strict'):
  15.         return codecs.charmap_encode(input, errors, encoding_map)
  16.  
  17.     
  18.     def decode(self, input, errors = 'strict'):
  19.         return codecs.charmap_decode(input, errors, decoding_map)
  20.  
  21.  
  22.  
  23. class StreamWriter(Codec, codecs.StreamWriter):
  24.     pass
  25.  
  26.  
  27. class StreamReader(Codec, codecs.StreamReader):
  28.     pass
  29.  
  30.  
  31. def getregentry():
  32.     return (Codec().encode, Codec().decode, StreamReader, StreamWriter)
  33.  
  34. decoding_map = copy.copy(cp037.decoding_map)
  35. decoding_map.update({
  36.     159: 8364 })
  37. encoding_map = codecs.make_encoding_map(decoding_map)
  38.